package com.mingqijia.gassafety.shared.constant;

import lombok.Getter;
import lombok.RequiredArgsConstructor;
@Getter
@RequiredArgsConstructor
public enum MbpStateEnum {

    STATUS_1("1", "未启动"),
    STATUS_2("2", "运行"),
    STATUS_3("3", "已挂起"),
    STATUS_7("7", "已完成"),
    STATUS_8("8", "已终止");

    private final String status;
    private final String name;

    public static String getStateName(String status) {
        if (status == null) {
            return null;
        }
        for (MbpStateEnum mbpStateEnum : MbpStateEnum.values()) {
            if (mbpStateEnum.status.equals(status)) {
                return mbpStateEnum.name;
            }
        }
        return null;
}
}
